package com.ithinkstudio.jeez.activiti7.config;

import java.io.Serializable;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

@Data
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
public class BaseResponse<T> implements Serializable {

	private int code;

	private String message;

	public static BaseResponse error(String msg) {
		return new BaseResponse<>().setCode(-1).setMessage(msg);
	}
	
	
	public static BaseResponse success(String msg) {
		return new BaseResponse<>().setCode(200).setMessage(msg);
	}
	
}
